import React, { Component } from "react";
import { Link } from "react-router-dom";
import { Breadcrumb, Table } from "antd";
export default class BillDetail extends Component {
  state = {
    goods: [],
  };
  componentDidMount() {
    let goods = JSON.parse(window.sessionStorage.getItem("goods"));
    this.setState({
      goods,
    });
  }
  render() {
    const { goods } = this.state;
    const columns = [
      {
        title: "物资唯一码",
        dataIndex: "batch",
        align: "center",
      },
      {
        title: "物料编码",
        dataIndex: "mat_mark",
        align: "center",
      },
      {
        title: "物料描述",
        dataIndex: "mat_des",
        align: "center",
      },
      {
        title: "到货数量",
        dataIndex: "end_num",
        align: "center",
      },
      {
        title: "线缆类物资盘数",
        dataIndex: "cable_num",
        align: "center",
      },
      {
        title: "计量单位",
        dataIndex: "unit",
        align: "center",
      },
    ];
    return (
      <div className="bill_detail">
        <Breadcrumb>
          <Breadcrumb.Item>
            <Link to="/">Admin</Link>
          </Breadcrumb.Item>
          <Breadcrumb.Item>台账管理</Breadcrumb.Item>
          <Breadcrumb.Item>入库台账查询</Breadcrumb.Item>
          <Breadcrumb.Item>入库台账查询详情</Breadcrumb.Item>
        </Breadcrumb>

        <Table
          rowKey="id"
          bordered
          dataSource={goods}
          columns={columns}
          pagination={false}
        />
      </div>
    );
  }
}
